package sel.me.spring.beans.configure;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.EnvironmentAware;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;

@Configuration
public class TestConfig implements EnvironmentAware{
	
	private Environment environment;
	
	@Value("${factoryBean.flag}")
    private String factoryBeanFlag;

	@Override
	public void setEnvironment(Environment environment) {
		this.environment = environment;
		System.out.println("factoryBean.flag="+ factoryBeanFlag);
		System.out.println("factoryBean.flag="+ environment.getProperty("factoryBean.flag"));
	}
	
}
